home *** CD-ROM | disk | FTP | other *** search
/ PC Home 109 / PC Home 109.iso / data1.cab / Program_Files / be002.dxr / 00142.ls < prev    next >
Encoding:
Text File  |  2001-03-02  |  2.3 KB  |  99 lines

  1. on exitFrame
  2.   puppetSprite(3, 1)
  3.   puppetSprite(4, 1)
  4.   puppetSprite(5, 1)
  5.   puppetSprite(6, 1)
  6.   if the timer < 1767 then
  7.     if the loaded of member "it breathes" = 0 then
  8.       preLoad(member "it breathes")
  9.     end if
  10.     if the loaded of member "ha trees don't" = 0 then
  11.       preLoad(member "ha trees don't")
  12.     end if
  13.     if the loaded of member "it moves" = 0 then
  14.       preLoad(member "it moves")
  15.     end if
  16.     duck1()
  17.     duck2()
  18.     duck3()
  19.     duck4()
  20.     go(the frame)
  21.   else
  22.     sound stop 2
  23.     go(the frame + 1)
  24.   end if
  25. end
  26.  
  27. on duck1
  28.   set the locH of sprite 3 to the locH of sprite 3 + random(10)
  29.   set temp to random(2)
  30.   if temp = 1 then
  31.     set the locV of sprite 3 to 301
  32.   else
  33.     set the locV of sprite 3 to 300
  34.   end if
  35.   if the locH of sprite 3 > 690 then
  36.     set the locH of sprite 3 to -50
  37.   end if
  38. end
  39.  
  40. on duck2
  41.   set the locH of sprite 4 to the locH of sprite 4 - random(15)
  42.   set temp to random(2)
  43.   if temp = 1 then
  44.     set the locV of sprite 4 to 352
  45.   else
  46.     set the locV of sprite 4 to 351
  47.   end if
  48.   if the locH of sprite 4 < -50 then
  49.     set the locH of sprite 4 to 690
  50.   end if
  51. end
  52.  
  53. on duck3
  54.   set the locH of sprite 5 to the locH of sprite 5 + random(15)
  55.   set temp to random(2)
  56.   if temp = 1 then
  57.     set the locV of sprite 5 to 386
  58.   else
  59.     set the locV of sprite 5 to 387
  60.   end if
  61.   if the locH of sprite 5 > 690 then
  62.     set the locH of sprite 5 to -50
  63.   end if
  64. end
  65.  
  66. on duck4
  67.   set the locH of sprite 6 to the locH of sprite 6 - random(10)
  68.   set temp to random(2)
  69.   if temp = 1 then
  70.     set the locV of sprite 6 to 418
  71.   else
  72.     set the locV of sprite 6 to 419
  73.   end if
  74.   if the locH of sprite 6 < -50 then
  75.     set the locH of sprite 6 to 690
  76.   end if
  77. end
  78.  
  79. on mouseUp
  80.   if (the loaded of member "it breathes" = 0) or (the loaded of member "ha trees don't" = 0) or (the loaded of member "it moves" = 0) then
  81.     if the loaded of member "it breathes" = 0 then
  82.       preLoad(member "it breathes")
  83.     end if
  84.     if the loaded of member "ha trees don't" = 0 then
  85.       preLoad(member "ha trees don't")
  86.     end if
  87.     if the loaded of member "it moves" = 0 then
  88.       preLoad(member "it moves")
  89.     end if
  90.   else
  91.     sound stop 1
  92.     repeat with n = 20 down to 1
  93.       puppetSprite(n, 0)
  94.       set the visible of sprite n to 1
  95.     end repeat
  96.     go(175)
  97.   end if
  98. end
  99.